import {} from 'react'
import { VideoCourtSchema } from '@src/components/schema/videoCourt'
import style from './index.module.less'
import { download } from '@src/assets/js/downloadRename'

interface Props {
  meetingData: VideoCourtSchema | { [k: string]: any }
}

function Main ({ meetingData }: Props) {
  const list: VideoCourtSchema[] = meetingData.meeting_file || []
  if (list.length === 0) {
    return <div />
  }
  return (
    <span className={style['file-list']}>
      <span className={style['file-list-label']}>已上传的笔录：</span>
      {
        list.map((li, i) => {
          return <a className={style.link} key={i} onClick={() => download(li.path, li.original_filename)}>{li.original_filename}</a>
        })
      }
    </span>
    )
}

export default Main
